# !/usr/bin/env python
# _*_ coding: utf-8 _*_
"""
Time      : 2019/12/20 12:13
@Author   : gao
@Site     : 
@File     : character_inversion_util.py
@Software : PyCharm
"""


# 字符串反转
def character_inversion(string):
    lenstr = len(string)
    ss = ''
    for i in range(lenstr, 0, -2):
        s = string[i - 2:i]
        ss = ss + s
    if ss:
        return ss


